<template>
  <van-tabs @click="clickHandle" class="tabs-box">
    <van-tab :title="item" v-for="(item, index) in titleData" :key="index">
      <slot :name="`content${index + 1}`"></slot>
    </van-tab>
  </van-tabs>
</template>

<script>
export default {
  name: "Tabs",
  props: {
    titleData: {
      type: Array,
      ddefault: function () {
        return [];
      },
    },
  },
  methods: {
    clickHandle(name, title) {
      //   this.$emit("textInfo", title);
    },
  },
};
</script>

<style scoped lang='less'>
.tabs-box {
  margin-top: 1.2rem;
}
</style>